{% extends "base.html" %}
{% block title %}组织架构{% endblock %}
{% block user %}组织架构{% endblock %}
{% block navbar %}{{ super() }}{% endblock %}
{% block styles %}{{ super() }}
<link href="{{ url_for('static', filename='orgchart/jquery.orgchart.css') }}" rel="stylesheet">


<style>
    h1 {
        text-align: center;
    }

    #chart-container {
        font-family: Arial;
        border: 2px dashed #aaa;
        border-radius: 5px;
        overflow: auto;
        text-align: center;
    }

    .orgchart {
        background: #fff;
    }

    .orgchart .c1 .title {
        background-color: #006699;
    }

    .orgchart .c1 .content {
        border-color: #006699;
    }

    .orgchart .c2 .title {
        background-color: #009933;
    }

    .orgchart .c2 .content {
        border-color: #009933;
    }

    .orgchart .c3 .title {
        background-color: #993366;
    }

    .orgchart .c3 .content {
        border-color: #993366;
    }

    .orgchart .c4 .title {
        background-color: #996633;
    }

    .orgchart .c4 .content {
        border-color: #996633;
    }

    .orgchart .c5 .title {
        background-color: #cc0066;
    }

    .orgchart .c5 .content {
        border-color: #cc0066;
    }

    .orgchart .c6 .title {
        background-color: #cc6061;
    }

    .orgchart .c6 .content {
        border-color: #cc6061;
    }

    .orgchart .c7 .title {
        background-color: #c5cc1f;
    }

    .orgchart .c7 .content {
        border-color: #c5cc1f;
    }

    .orgchart .c8 .title {
        background-color: #2c3acc;
    }

    .orgchart .c8 .content {
        border-color: #2c3acc;
    }

    .orgchart .c9 .title {
        background-color: #40cc92;
    }

    .orgchart .c9 .content {
        border-color: #40cc92;
    }

    .orgchart .c10 .title {
        background-color: #c4cc25;
    }

    .orgchart .c10 .content {
        border-color: #c4cc25;
    }
</style>
{% endblock %}
{% block scripts %}{{ super() }}
<script src="{{ url_for('static', filename='orgchart/jquery.orgchart.js') }}"></script>
<script>
    $(function () {
        var ds = {{ orgchart | tojson
    }};
    var oc = $('#chart-container').orgchart({
        'data': ds,

        'depth': 2,
        'pan': true,
        'zoom': true,
        'verticalLevel': 6,
        'nodeContent': 'title'
    });
        })
    $(function () {
        $(" .node").click(function () {
            var id = this.id; if (id == 116) { id = 50 } if (id == 117) { id = 38 } if (id == 118) {
                id = 92
            } window.open("{{ url_for('bp_partner.calendar', user_id='aaaa' ) }}".replace("aaaa", id), "_self")
        })
    })
</script> {% endblock %} {% block content %} <h1>2019 JMH重工模块事业本部技术部组织架构图</h1>

<div id="chart-container"></div>

{% endblock %}